#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
struct matrix{
    int n,m;
    vector<vector<double> >data;
    const vector<double> none;
    matrix(){
        data.clear();
    }
    matrix(int row,int col):n(row),m(col){
        for(int i=0;i<n;i++){
            data.push_back(none);
            for(int j=0;j<m;i++){
                data[i].push_back(0.0);
            }
        }
    }
};
matrix operator*(matrix a,matrix b){
    matrix c;
    if(a.m!=b.n) return c;
    c.n=a.n,c.m=b.m;
    for(int i=0;i<c.n;i++){
        for(int j=0;j<c.m;j++){
            for(int k=0;k<a.m;k++){
                c.data[i][j]+=a.data[i][k]*b.data[k][j];
            }
        }
    }
    return c;
}
matrix operator+(matrix a,matrix b){
    matrix c;
    if(a.m!=b.m || a.n!=b.n) return c;
    c.n=a.n,c.m=b.m;
    for(int i=0;i<c.n;i++){
        for(int j=0;j<c.m;j++){
            c.data[i][j]=a.data[i][j]+b.data[i][j];
        }
    }
    return c;
}
void sigmoid(matrix &a){
    for(int i=0;i<a.n;i++){
        for(int j=0;j<a.m;j++){
            a.data[i][j]=1.0/(1-exp(a.data[i][j]));
        }
    }
}
matrix E[4]={matrix(784,1),matrix(20,1),matrix(20,1),matrix(10,1)},W[4]={matrix(0,0),matrix(784,20),matrix(20,20),matrix(20,10)},B[4]={matrix(0,0),matrix(20,1),matrix(20,1),matrix(10,1)};
void Calcutius(){
    E[1]=sigmoid(E[0]*W[1]+B[1]);
    E[2]=sigmoid(E[1]*W[2]+B[2]);
    E[3]=sigmoid(E[2]*W[3]+B[3]);
    for(int i=0;i<10;i++){
        cout<<E[i].data[0][i]<<" ";
    }
    cout<<endl;
}
int main(){
    return 0;
}